package com.wlxt.springcloud.book.constant;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.wlxt.springcloud.book.entity.Book;
import com.wlxt.springcloud.book.entity.Borrow;

public class Constants {
	//图书库存
	public final static Map<String, Book> BOOK_MAP = new ConcurrentHashMap<>();
	//借书记录
	public final static Map<String, Borrow> BORROW_MAP = new ConcurrentHashMap<>();
	
	static {
		Book book = new Book("b1", "111111", "Java编程思想（第4版）", "Bruce Eckel", "机械工业出版社", 42.0, 86.0, "计算机与互联网", 90);
		BOOK_MAP.put("b1", book);
		book = new Book("b2", "222222", "算法导论（原书第3版）", "Thomas H.Cormen", "机械工业出版社", 66.0, 101.1, "计算机科学丛书", 30);
		BOOK_MAP.put("b2", book);
		book = new Book("b3", "333333", "疯狂Java讲义（第4版）", "李刚", "电子工业出版社", 36.0, 109.0, "计算机与互联网", 50);
		BOOK_MAP.put("b3", book);
	}
}
